how to solve indices problem